package com.framework.yhbapi.controller;

import com.framework.exception.util.RespResult;
import com.framework.service.yhbservice.YhbFlowTakeService;
import com.framework.yhbEntity.transaction.YhbFlowTake;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 功能描述: 流水控制器
 *
 * @author ck
 * @date 2018/9/26 20:32
 */
@RestController
@Api(value="流水查询模块",tags={"流水查询模块"})
@RequestMapping(value = "yhbFlow")
public class YhbFlowController {

	@Autowired
	private YhbFlowTakeService yhbFlowTakeService;


	/**
	 * 提现列表
	 * @param token
	 * @param pageNo
	 * @return
	 */
	@GetMapping("user/queryFlowTakeList")
	@ApiOperation("提现流水")
	@ApiImplicitParams({
			@ApiImplicitParam(name="pageNo",value="页码",dataType="int", paramType = "query" ,required = true),
			@ApiImplicitParam(name="token",value="登录产生的token",dataType="String", paramType = "query",required = true)
	})
	public RespResult queryFlowTaskList(String token,Integer pageNo) {
		List<YhbFlowTake> list = yhbFlowTakeService.queryFlowTakeList(token,pageNo);
		return RespResult.ok().put("list",list);
	}


}
